<extend name="Public/Info/Common"/>
<block name="pageHeader"></block>

<block name="pageContent">
    <div class="bjui-pageContent tableContent">
        <form action="{:U('save')}" class="pageForm" data-toggle="validate">
            <!-- Tabs -->
            <ul class="nav nav-tabs" role="tablist">
                <?php foreach($websiteConfigList as $key => $config):?>
                <li <?php echo $key==1? 'class="active"' : '';?>>
                <a href="#config{$key}" role="tab" data-toggle="tab">
                    {$config.name}
                </a>
                </li>
                <?php endforeach;?>
            </ul>
            <!-- Tab panes -->
            <div class="tab-content">
                <volist name="websiteConfigList" id="configList">
                    <div class="tab-pane fade <?php echo $key==1 ? 'active in' : '';?>" id="config{$key}">
                        <fieldset>
                            <volist name="configList.list" id="config">
                                <div class="col-md-4">
                                    <label class="item-label">{$config.title}<span
                                            class="check-tips">（{$config.remark}）</span> </label>

                                    <div class="controls">
                                        <switch name="config.type">
                                            <case value="0">
                                                <input type="text" class="text input-small"
                                                       name="config[{$config.name}]"
                                                       value="{$config.value}">
                                            </case>
                                            <case value="1">
                                                <input type="text" class="text input-large"
                                                       name="config[{$config.name}]"
                                                       value="{$config.value}">
                                            </case>
                                            <case value="2">
                                                <label class="textarea input-large">
                                                    <textarea name="config[{$config.name}]">{$config.value}</textarea>
                                                </label>
                                            </case>
                                            <case value="3">
                                                <label class="textarea input-large">
                                                    <textarea name="config[{$config.name}]">{$config.value}</textarea>
                                                </label>
                                            </case>
                                            <case value="4">
                                                <select name="config[{$config.name}]">
                                                    <volist name=":parse_config_attr($config['extra'])" id="vo">
                                                        <option value="{$key}"
                                                        <eq name="config.value" value="$key">selected</eq>
                                                        >{$vo}</option>
                                                    </volist>
                                                </select>
                                            </case>
                                        </switch>
                                    </div>
                                </div>
                            </volist>
                        </fieldset>
                    </div>
                </volist>
            </div>
        </form>
    </div>
</block>
